Don't g_free gslice-allocated structures
authorMatthias Clasen <mclasen@redhat.com>
Wed, 27 Oct 2010 15:16:02 +0000 (11:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 27 Oct 2010 15:18:46 +0000 (11:18 -0400)
This was causing memory corruption when removing remote plugs from
sockets.

gtk/gtkdnd.c

index b36960a5c61ea10e83065bb68aa18787590a8e28..d95118163224e5e4e606d4be91785ea9bbf67988 100644 (file)
@@ -1300,7 +1300,7 @@ gtk_drag_dest_set_proxy (GtkWidget      *widget,
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (!proxy_window || GDK_IS_WINDOW (proxy_window));
 
-  site = g_new (GtkDragDestSite, 1);
+  site = g_slice_new (GtkDragDestSite);
 
   site->flags = 0;
   site->have_drag = FALSE;